<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head th:replace="~{fragments/header :: header}">
</head>
<body>
<div class="container-fluid">
    <div class="row ">
        <!-- 左侧栏目 -->
        <nav class="col-md-2 d-none d-md-block bg-light sidebar" >
            <li class="sidebar-sticky">
                <!-- 分类 -->
                <ul class="nav flex-column nav-pills"  style="margin-bottom: 5em" id="accordion">
                    <li class="nav-item"  th:each="module:${modules}">
                        <a th:if="${module.functions.size()}==1" class="nav-link function"  href="JavaScript:void(0)"  th:text="${module.moduleName}" th:attr="url=${module.functions.get(0).functionSite}"></a>
                        <div th:if="${module.functions.size()}!=1">
                            <a  class="nav-link"  data-toggle="collapse" th:href="'#function'+${module.moduleId}"  th:text="${module.moduleName}"></a>
                            <div  th:id="'function'+${module.moduleId}"  class="panel-collapse collapse in" data-parent="#accordion" >
                                <div class="nav-item example"  th:each="f:${module.functions}">
                                    <a class="nav-link function"  href="JavaScript:void(0)"  th:text="${f.functionName}" th:attr="url=${module.moduleId}==4 ? ${f.functionSite}+${teacher.teacherNumber}:${f.functionSite}"></a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
        </nav>

        <!-- 右侧栏目 -->
        <main class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4 " role="main"  style="margin-bottom: 5em">
            <div  id="rightContainer" >
                <h1 class="text-center">欢迎使用实验室管理系统</h1>
                <h3 class="text-center text-danger">此校园实验室系统纯属个人开发而成，自备一些基本的相应操作，仅供参考学习！</h3>
            </div>
        </main>
    </div>
    <!-- /.row -->
</div>
<div th:replace="~{fragments/footer ::footer}"></div>
</body>
<script th:inline="javascript">
var url="";
var container=$("#rightContainer");
</script>
<script src="../../js/index.js" th:src="@{/js/index.js}"></script>
<link rel="stylesheet" href="../../css/index.css" th:src="@{/css/index.css}">
</html>